<?php

/**
 *  布居
 * @file   menu.php
 * @date   2016-9-2 16:18:45
 * @author Zhenxun Du<5552123@qq.com>
 * @version    SVN:$Id:$
 */

namespace application\admin\widget;

use think\Db;
use think\Session;

class Site {

    public function site(){
        Session::get('user_id') != 1 ? $where['user_id'] = Session::get('user_id') : $where['user_id']=1;

        $date = Db::name('site')->where($where)->find();
        $name = $date['name'];
        $logo = $date['logo'];
        $str = '<i><img src='.$logo.' width=40px height=30px /></i>&nbsp;'.  $name ;
        return $str;
    }
}
